# $Id: PKGBUILD 165146 2012-08-11 19:32:38Z eric $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Charles Mauch <cmauch@gmail.com>

pkgname=perl-yaml
_realname=YAML
pkgver=0.84
pkgrel=1
pkgdesc="Perl/CPAN Module YAML : YAML Aint Markup Language"
arch=('any')
url="http://search.cpan.org/dist/${_realname}/"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/M/MS/MSTROUT/${_realname}-${pkgver}.tar.gz)
md5sums=('3644f03e3da5d99158963c6613f5ff92')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
